package us.icitap.timsportal.entity;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the USERS_ROLE database table.
 * 
 */
@Entity
@Table(name="USER_ROLE", schema="TIMSPORTAL")
public class UserRole implements Serializable, Cloneable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5999150592853916969L;

	@EmbeddedId
	private UserRolePK id;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="RECORD_DATE")
	private Date recordDate;

	@Column(name="RECORD_USER")
	private String recordUser;

	private String status;

    public UserRole() {
    }

	public UserRolePK getId() {
		return this.id;
	}

	public void setId(UserRolePK id) {
		this.id = id;
	}
	
	public Date getRecordDate() {
		return this.recordDate;
	}

	public void setRecordDate(Date recordDate) {
		this.recordDate = recordDate;
	}

	public String getRecordUser() {
		return this.recordUser;
	}

	public void setRecordUser(String recordUser) {
		this.recordUser = recordUser;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}
	
	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof UserRole)) {
			return false;
		}
		UserRole castOther = (UserRole)other;
		return 
			(this.id == castOther.id);
			
    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.id.hashCode();

		return hash;
	}

}